package com.qf.mybatis;

import com.qf.mybatis.mapper.UserMapper;
import com.qf.mybatis.pojo.User;
import com.qf.mybatis.utils.MyBatisUtils;
import org.junit.Test;

public class HelloMybatis3 {
    @Test
    public void test1(){
        UserMapper mapper = MyBatisUtils.getMapper(UserMapper.class);
        User user=mapper.selectUserById(3);
        System.out.println(user);
    }
    @Test
    public void test2(){
        UserMapper mapper = MyBatisUtils.getMapper(UserMapper.class);
        int delete = mapper.delete("zl");
        System.out.println(delete);
        MyBatisUtils.commit();
    }


}
